home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
win_utl1
/
cron18.zip
/
KILLWIN.TXT
< prev
next >
Wrap
Text File
|
1996-06-17
|
3KB
|
52 lines
KILLWIN.EXE - A Windows executable that will close another window.
Usage:
>KILLWIN [-u] Window title
-u Uses an unfriendly method to close the window. Most windows will
die without uttering a peep with this option. This can result in
the loss of data. Some windows do not clean up after themselves
well when killed this way. Use this option at your own risk.
Window title - The window title will be used to locate the window
to be closed. Only a fragment of the title needs to be supplied.
If the beginning of the title matches the fragment supplied,
the window will be closed. All windows with titles that match
will be closed. The comparison is case sensitive.
This utility was specifically written for Cron the Clock Daemon. It is
sometimes desireable to have Cron close certain running programs. For
example, a night compile might fail if the executable file was in use
because the program was running. KILLWIN could be used to close all
instances of the program before starting the compilation process.
The KillWin program offers a method for closing active Windows on your
desktop. It works by enumerating all top level windows and comparing
the title text against a string. Each Window whose title starts with
the given string is sent a WM_CLOSE message. This is normally a safe
way to close a window because it has the opportunity to query the user
to save any unsaved data.
It is important to note that the title string comparison is case
sensitive. Also note that there are often many windows running in the
background that the user does not see. Providing a title string that
is too short may accidentally match Windows required by the system,
which can have catastrophic side effects.
The optional parameter '-u' can be specified to use a less friendly
method of closing the window. In this case, a WM_QUIT message is sent
to the application. By definition, WM_QUIT causes the message loop
function GetMessage() to return 0, which suddenly stops all message
processing in the target program. This can be dangerous because many
programs will not have an opportunity to query the user to save data
and data can be lost. Also, some programs do not clean up after
themselves after the GetMessage() loop, which may prevent further
instances of the program from executing without restarting Windows.
KILLWIN is distributed by Software Engineering, Inc. with Cron the
Clock Daemon. It may not be re-distributed unless accompanied by the
Cron program and its associated files.
Copyright (c) 1995-1996, Software Engineering, Inc.
All rights reserved.